// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import './assets/animate.min.css'
import './assets/reset.css'
import './style/iconfont.css'
import './assets/rem'
import './assets/fastclick'
FastClick.attach(document.body)

if (process.env.DEBUG_ENV && process.env.NODE_ENV === 'production') {
  new VConsole()
}

Vue.prototype.cdn = function(value, width) {
  const RealWidth = document.documentElement.clientWidth / 750 * width
  return `${value}?x-oss-process=image/resize,w_${RealWidth}`
}

Vue.prototype.pxToRem = function(val) {
  return `${val / 40}`
}

Vue.use(VueAwesomeSwiper)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
